<?php

	//1.连接mysql数据库
	//语法：mysqli_connect(主机名,用户名,密码,数据库名);创建一个连接资源
	$host = 'localhost';
	$dbuser = 'root';
	$dbpwd = 'root';
	$dbname = 'syweb07';

	$conn = mysqli_connect($host,$dbuser,$dbpwd,$dbname);

	//2.设置数据库连接编码
	mysqli_query($conn,"set NAMES utf8");

?>